﻿CREATE TABLE [dbo].[IssueType] (
    [IssueTypeId]          INT           NOT NULL,
    [CategoryId]           INT           NULL,
    [ScopeId]              INT           NULL,
    [Severity]             INT           NULL,
    [Description]          VARCHAR (255) NULL,
    [ThresholdValue]       INT           NULL,
    [ThresholdDescription] VARCHAR (255) NULL,
    CONSTRAINT [PK_IssueType] PRIMARY KEY CLUSTERED ([IssueTypeId] ASC),
    CONSTRAINT [FK_IssueType_Category] FOREIGN KEY ([CategoryId]) REFERENCES [dbo].[Category] ([CategoryId]),
    CONSTRAINT [FK_IssueType_Scope] FOREIGN KEY ([ScopeId]) REFERENCES [dbo].[Scope] ([ScopeId])
);

